//
//  JOImageTextField.m
//  taxin_song
//
//  Created by song on 16/1/16.
//  Copyright © 2016年 song. All rights reserved.
//

#import "JONameTextField.h"

@interface JONameTextField ()


@property(nonatomic , strong) UIImageView *imgview;

@end

@implementation JONameTextField

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

-(instancetype) initWithFrame:(CGRect)frame
{
    
    self = [super initWithFrame:frame];
    if(self)
    {
        self.font = [UIFont systemFontOfSize:13];

        // 如果要显示搜索框左边的试图，一定要设置左边的试图模式
        self.leftViewMode = UITextFieldViewModeAlways;
//        self.placeholder= @"请输入帐号";
        
    }

    return self;
}

-(void)setImgname:(NSString *)imgname
{
    _imgview = [[UIImageView alloc] initWithImage:[UIImage imageNamed:imgname]];
    _imgview.contentMode =UIViewContentModeCenter;
    _imgview.frame = CGRectMake(0, 0, 30, 0);
    self.leftView = _imgview;
}

-(void)setHolder:(NSString *)holder
{
    self.placeholder= @"holder";
}

-(void)layoutSubviews
{
    [super layoutSubviews];

}
@end
